﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Interop.Excel;
using ExcellData;

namespace ExcelUtilities12
{
	/// <summary>
	/// Classe que encapsula um documento excel
	/// </summary>
	public class Workbook12 : IWorkbook
	{
		private Workbook _Workbook;

		public Workbook12(Workbook workbook)
		{
			_Workbook = workbook;
		}

		#region IWorkbook Members

		public IWorksheet ActiveSheet
		{
			get { return new Worksheet12((Worksheet)_Workbook.ActiveSheet); }
		}

		public ISheets Sheets
		{
			get
			{
				return new Sheets12(_Workbook.Sheets);
			}
		}

		public void Close()
		{
			_Workbook.Close(Type.Missing, Type.Missing, Type.Missing);
		}

		#endregion
	}
}
